#define  _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int main()
{
	int a = 0;
	while(scanf("%d", &a)!=EOF)
	{ 
		int b = 1;
		int n = 0;
		for (int i = 0;i < 32;i++)
		{
			n = b & (a >> (31 - i));
			printf("%d\n", n);
		}
	}
	return 0;
}